﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Root.master" AutoEventWireup="true" CodeBehind="UpdateHistory.aspx.cs" Inherits="StockCrawler.UpdateHistory" %>
<%@ Register assembly="DevExpress.Web.v14.2, Version=14.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Data.Linq" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Content" runat="server">
    <dx:ASPxSplitter ID="ASPxSplitter2" runat="server" Height="100%">
        <Panes>
            <dx:SplitterPane Size="15%">
                <ContentCollection>
                    <dx:SplitterContentControl runat="server">
                        <table>
                            <tr>
                                <td>
                                    <dx:ASPxButton ID="btnUpdateHistory" runat="server" Text="Update History" OnClick="btnUpdateHistory_Click"></dx:ASPxButton>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <dx:ASPxLabel ID="lblDate" runat="server" Text="Date Start">
                                    </dx:ASPxLabel>
                                </td>
                                <td>
                                    <dx:ASPxDateEdit ID="dateStart" runat="server" EditFormat="Custom" Date="2009-11-02 09:23" Width="100">
                                        <TimeSectionProperties>
                                            <TimeEditProperties EditFormatString="hh:mm tt" />
                                        </TimeSectionProperties>
                                    </dx:ASPxDateEdit>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <dx:ASPxLabel ID="ASPxLabel1" runat="server" Text="Date End">
                                    </dx:ASPxLabel>
                                </td>
                                <td>
                                    <dx:ASPxDateEdit ID="dateEnd" runat="server" EditFormat="Custom" Date="2009-11-02 09:23" Width="100">
                                        <TimeSectionProperties>
                                            <TimeEditProperties EditFormatString="hh:mm tt" />
                                        </TimeSectionProperties>
                                    </dx:ASPxDateEdit>
                                </td>
                            </tr>
                            <tr><td>
                                <dx:ASPxButton ID="btnView" runat="server" Text="View Result" OnClick="btnView_Click"></dx:ASPxButton>
                                </td></tr>
                        </table>
                    </dx:SplitterContentControl>
                </ContentCollection>
            </dx:SplitterPane>
            <dx:SplitterPane>
                <ContentCollection>
                    <dx:SplitterContentControl runat="server">
                        <dx:ASPxGridView ID="gridHistory" runat="server" AutoGenerateColumns="true" DataSourceID="LinqServerModeDataSourceHistory" ClientInstanceName="detailGridView" KeyFieldName="id_stock" Width="100%">
                            <%--<Columns>
                                <dx:GridViewDataDateColumn Caption="Mã" FieldName="code" ShowInCustomizationForm="True" VisibleIndex="1" Width="70px">
                                </dx:GridViewDataDateColumn>
                                <dx:GridViewDataDateColumn Caption="Sàn" FieldName="stockexchange_name" ShowInCustomizationForm="True" VisibleIndex="1" Width="70px">
                                </dx:GridViewDataDateColumn>
                                <dx:GridViewDataDateColumn Caption="Ngày GD" FieldName="ngay_giao_dich" ShowInCustomizationForm="True" VisibleIndex="1" Width="70px">
                                </dx:GridViewDataDateColumn>
                                <dx:GridViewDataTextColumn Caption="Đóng cửa" FieldName="gia_dong_cua" ShowInCustomizationForm="True" VisibleIndex="2" Width="70px">
                                    <PropertiesTextEdit DisplayFormatString="#,##0.0">
                                    </PropertiesTextEdit>
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn Caption="Thay đổi (%)" FieldName="thay_doi" ShowInCustomizationForm="True" VisibleIndex="3" Width="80px">
                                    <PropertiesTextEdit DisplayFormatString="#0.0">
                                    </PropertiesTextEdit>
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn Caption="Tham chiếu" FieldName="gia_tham_chieu" ShowInCustomizationForm="True" VisibleIndex="4" Width="80px">
                                    <PropertiesTextEdit DisplayFormatString="#,##0.0">
                                    </PropertiesTextEdit>
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn Caption="Mở cửa" FieldName="gia_mo_cua" ShowInCustomizationForm="True" VisibleIndex="5" Width="70px">
                                    <PropertiesTextEdit DisplayFormatString="#,##0.0">
                                    </PropertiesTextEdit>
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn Caption="Cao nhất" FieldName="gia_cao_nhat" ShowInCustomizationForm="True" VisibleIndex="6" Width="70px">
                                    <PropertiesTextEdit DisplayFormatString="#,##0.0">
                                    </PropertiesTextEdit>
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn Caption="Thấp nhất" FieldName="gia_thap_nhat" ShowInCustomizationForm="True" VisibleIndex="7" Width="70px">
                                    <PropertiesTextEdit DisplayFormatString="#,##0.0">
                                    </PropertiesTextEdit>
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn Caption="KLGD" FieldName="klgd_khop_lenh" ShowInCustomizationForm="True" VisibleIndex="8" Width="70px">
                                    <PropertiesTextEdit DisplayFormatString="#,###">
                                    </PropertiesTextEdit>
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn Caption="GTGD" FieldName="gtgd_khop_lenh" ShowInCustomizationForm="True" VisibleIndex="9" Width="100px">
                                    <PropertiesTextEdit DisplayFormatString="#,###">
                                    </PropertiesTextEdit>
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn Caption="SL mua" FieldName="so_lenh_mua" ShowInCustomizationForm="True" VisibleIndex="14" Width="80px">
                                    <PropertiesTextEdit DisplayFormatString="#,###">
                                    </PropertiesTextEdit>
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn Caption="KL đặt mua" FieldName="kl_dat_mua" ShowInCustomizationForm="True" VisibleIndex="15" Width="80px">
                                    <PropertiesTextEdit DisplayFormatString="#,###">
                                    </PropertiesTextEdit>
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn Caption="SL bán" FieldName="so_lenh_ban" ShowInCustomizationForm="True" VisibleIndex="16" Width="80px">
                                    <PropertiesTextEdit DisplayFormatString="#,###">
                                    </PropertiesTextEdit>
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn Caption="KL đặt bán" FieldName="kl_dat_ban" ShowInCustomizationForm="True" VisibleIndex="17" Width="80px">
                                    <PropertiesTextEdit DisplayFormatString="#,###">
                                    </PropertiesTextEdit>
                                </dx:GridViewDataTextColumn>
                            </Columns>--%>
                            <SettingsBehavior AllowSelectByRowClick="True" />
                            <SettingsPager Mode="ShowAllRecords">
                                <PageSizeItemSettings ShowAllItem="True" Visible="True">
                                </PageSizeItemSettings>
                            </SettingsPager>
                            <Settings VerticalScrollBarMode="Auto" HorizontalScrollBarMode="Auto" VerticalScrollableHeight="550" />
                        </dx:ASPxGridView>
                        <dx:LinqServerModeDataSource ID="LinqServerModeDataSourceHistory" runat="server" ContextTypeName="StockCrawlerLib.StockDataClassesDataContext" OnSelecting="LinqServerModeDataSourceHistory_Selecting"></dx:LinqServerModeDataSource>
                    </dx:SplitterContentControl>
                </ContentCollection>
            </dx:SplitterPane>
        </Panes>
    </dx:ASPxSplitter>
</asp:Content>
